import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/index'
},
{
    path: '/index',
    name: 'index',
    component: () =>
        import ( /* webpackChunkName: "Index" */ '../views/index.vue'),
},
{
  path: '/index2',
  name: 'index2',
  component: () =>
      import ( /* webpackChunkName: "Index" */ '../views/index2.vue'),
},
{
  path: '/subject',
  name: 'subject',
  component: () =>
      import ( /* webpackChunkName: "Index" */ '../views/subject.vue'),
},
{
  path: '/sizeManage',  
  name: 'sizeManage',
  component: () =>
      import ( /* webpackChunkName: "Index" */ '../views/SizeManage.vue'),
},
{
  path: '/LadderPrice',
  name: 'LadderPrice',
  component: () =>
      import ( /* webpackChunkName: "Index" */ '../views/LadderPrice.vue'),
},
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})
router.beforeEach((to, from, next) => {
    // if (to.name == "Index") {
    //     plus.runtime.quit()
    // }
    next();
    /* 必须调用 `next` */
})

export default router